package com.sky.skyopsserver.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sky.skyopsserver.domain.Host;
import com.sky.skyopsserver.vos.*;

import java.util.List;

public interface HostService extends IService<Host> {

    Long addHost(HostAddReqVO reqVO);
    Boolean updateHost(HostUpdateReqVO reqVO);
    Boolean deleteHost(Long id);
    Boolean batchDeleteHost(List<Long> ids);
    HostRspVO getHostById(Long id);
    HostRspVO getHostByName(String name);
    IPage<HostRspVO> getHostPage(HostPageReqVO reqVO);
    List<HostOptionRspVO> getAllHostOptions();
    List<HostOptionRspVO> getHostOptionsByRoomId(Long roomId);
    List<HostOptionRspVO> getHostOptionsByGroupId(Long groupId);
    HostStatisticsRspVO getHostStatistics();
    Boolean checkHostNameExists(String name, Long excludeId);
    Boolean checkHostIpExists(String ip, Long excludeId);
    List<HostRspVO> searchHostByName(String name);
    List<HostRspVO> getHostsByRoomId(Long roomId);
    List<HostRspVO> getHostsByGroupId(Long groupId);
    List<HostRspVO> getHostsByType(String type);
    Boolean validateHostType(String type);
    Boolean validateIpAddress(String ip);
    Boolean validatePort(Integer port);
    Boolean testHostConnection(Long id);
    Boolean moveHostsToGroup(List<Long> hostIds, Long targetGroupId);
    Boolean moveHostsToRoom(List<Long> hostIds, Long targetRoomId);
    List<String> getAllHostNames();
    List<String> getAllHostIps();
    Long getHostCountByRoomId(Long roomId);
    Long getHostCountByGroupId(Long groupId);
    List<HostRspVO> getExpiredHosts();
    List<HostRspVO> getHostsExpiringSoon(Integer days);
}
